import router from './router/index.js'

import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style

//全局进度条的配置
NProgress.configure({
    easing: 'ease', // 动画方式
    speed: 1000, // 递增进度条的速度
    showSpinner: false, // 是否显示加载ico
    trickleSpeed: 200, // 自动递增间隔
    minimum: 0.3, // 更改启动时使用的最小百分比
    parent: 'body', //指定进度条的父容器
})
// const store = useStore();
// const whiteList = ['/business/login', '/admin/login'] // no redirect whitelist
// const businessPrefix = "/business";
// const adminPrefix = "/admin"
router.beforeEach(async (to, from, next) => {
    NProgress.start()
})

router.afterEach(() => {
    NProgress.done()
})
